connectors.dataconnectors.
com.ebasetech.xi.api.connectors.DataConnectors#getDataconnectors(): The namespace location to store customized Data Connectors that are been created in the workspace and have not been downloaded from the Resource Hub
Further documentation.
Data Connector example:
if (!connectors.dataconnectors.myservice) { connectors.dataconnectors.myservice = new MyService(); } // MyService Data Connector function MyService() { const restDataConnector = new RESTDataConnector("https://my.service.example.com/api/2.1/"); this.authorize = function (params) { const uri = restDataConnector.createUri("authorise"); const body = { "user" : fields.user.value, "password" : fields.password.value }; const options = { parameters: params }; return restDataConnector.post(uri, body, options); } }
On Click Event:
try { var response = connectors.dataconnectors.myservice.authorize(); log(response.authorised); } catch(e) { event.owner.addErrorMessage("Unable to authorize user"); }
returns java.util.Map
connectors.dataconnectors.
com.ebasetech.xi.api.connectors.DataConnectors#getDataconnectors(): The namespace location to store customized Data Connectors that are been created in the workspace and have not been downloaded from the Resource Hub
Further documentation.
Data Connector example:
On Click Event: